﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Images;

namespace Silvermoon.Controls.Sys
{
    public class TextboxClipToolbar : Toolbar
    {
        public TextboxClipToolbar()
            : base()
        {
            this.Color = System.Drawing.Color.Black;
            this.TextColor = System.Drawing.Color.White;
            //CreateButton().Content = SysImages.Back;
            CreateButton().Content = SysImages.Cut;
            CreateButton().Content = SysImages.Copy;
            CreateButton().Content = SysImages.Paste;

            //Buttons[0].Tap += (s, e) =>
            //{
            //    Screen.CurrentWindow.PopToolbar(this);
            //    if (TextboxBase.FocusedTextbox != null) TextboxBase.FocusedTextbox.IsMarking = false;
            //};

            Buttons[0].Tap += (s, e) => TextboxBase.FocusedTextbox.Cut();
            Buttons[1].Tap += (s, e) => TextboxBase.FocusedTextbox.Copy();
            Buttons[2].Tap += (s, e) => TextboxBase.FocusedTextbox.Paste();

        }
    }
}
